/*************************************************************************
	> File Name: clock_getres.c
	> Author: Angel Criss
	> Blog: blog.abbycin.tk 
	> Created Time: Sat 05 Jul 2014 02:37:06 PM CST
 ************************************************************************/

#include"head.h"
int main(int argc,char *argv[])
{
    struct timespec res; //declare the specific time pointer

    //res.tv_sec=3;
    //res.tv_nsec=0;

    if(clock_getres(CLOCK_MONOTONIC,&res)==-1) // seems no defferent between CLOCK_MONOTONI and CLOCK_REALTIME
    {
        perror("clock_getres:");
        _exit(errno);
    }

    printf("the sec is :\t\e[33m%3d\e[0m\t the nsec is:\t\e[36m%3d\e[0m\n",res.tv_sec,res.tv_nsec);
}
